﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Video.Domain.Users;

namespace Video.Domain.UserRepository
{
    public interface IUserInfoRepository : IRepository<UserInfo>
    {
        /// <summary>
        /// 登录获取用户详细信息
        /// 包括角色
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        Task<Role> GetAsync(string cold);
        Task<UserInfoRoleView?> GetUserInfoRoleAsync(string username, string password);
        /// <summary>
        /// 查询获取用户详细信息
        /// 包括角色
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        Task<UserInfoRoleView?> GetAsync(Guid guid);
        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="keywords"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <param name="skipCount"></param>
        /// <param name="maxResultCount"></param>
        /// <returns></returns>
        Task<List<UserInfo>> GetListAsync(string? keywords,DateTime? startTime,DateTime? endTime,int skipCount,int maxResultCount);
        /// <summary>
        /// 获取用户总数
        /// </summary>
        /// <param name="keywords"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        Task<int> GetCountAsync(string? keywords, DateTime? startTime, DateTime? endTime);
        Task DeleteAsync(IEnumerable<Guid> guid);
        Task EnableAsync(IEnumerable<Guid> guid,bool enable=true);

    }
}
